fix(tcp): re-enable stale IPv6 listen/dial integration test#1375
Open
yashksaini-coder wants to merge 2 commits into
Open
fix(tcp): re-enable stale IPv6 listen/dial integration test#1375yashksaini-coder wants to merge 2 commits into
yashksaini-coder wants to merge 2 commits into
Conversation
…ibp2p#1189) The @pytest.mark.skip was added in d8e6455 when listen() took an external nursery arg — the external-nursery path had an IPv6-specific hang. PR libp2p#1308 later refactored listen() to use an internal system task (trio.lowlevel.spawn_system_task), removing the nursery parameter entirely and fixing the root cause. The skip was never revisited. Remove the decorator and the stale TODO comment. The test now passes in ~40ms; all 12 TCP transport tests remain green.
Contributor
Author
|
@acul71 please check this small update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1189.
Removes a stale
@pytest.mark.skipfromtest_ipv6_tcp_listen_and_dialintests/core/transport/test_tcp.py.Why the skip existed: The decorator was added in d8e6455 alongside the initial IPv6 feature. At that point
listen()accepted an externalnurseryparameter, and the external-nursery code path had an IPv6-specific hang (interaction between the pytest-trio nursery andtrio.serve_tcpon AF_INET6 sockets).Why it is now safe to remove: PR #1308 refactored
listen()to drop thenurseryparameter entirely and switch totrio.lowlevel.spawn_system_taskfor the internal server loop. That change fixed the root cause. Two other pieces were already in place:multiaddr_from_socketcorrectly unpacks the 4-tuple(host, port, flowinfo, scope_id)returned bygetsockname()on IPv6 sockets (needed forget_addrs())trio.serve_tcpsetsIPV6_V6ONLY=1automatically when it opens an AF_INET6 socket — no extra socket options neededThe skip was never revisited after #1308 landed.
Test plan
pytest tests/core/transport/test_tcp.py -k ipv6— 4 passedpytest tests/core/transport/test_tcp.py— 12 passedmake lintclean (ruff, ruff-format)References
listen())